package cn.edu.suse.epilepsy.service.impl;

import cn.edu.suse.epilepsy.entity.pojo.DoctorTradeInfo;
import cn.edu.suse.epilepsy.mapper.DoctorTradeInfoMapper;
import cn.edu.suse.epilepsy.service.DoctorTradeInfoService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
* @Author: QingShu
* @Date: 2024/7/8 1:06
 * 
*/
@Service
@Transactional(rollbackFor = Throwable.class)
public class DoctorTradeInfoServiceImpl extends ServiceImpl<DoctorTradeInfoMapper, DoctorTradeInfo> implements DoctorTradeInfoService {

    @Autowired
    private DoctorTradeInfoMapper doctorManageMapper;
        @Override
        public List<DoctorTradeInfo> selectDoctorTradeInfoByDoctorId(Integer doctorId) {
            QueryWrapper<DoctorTradeInfo> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("doctor_id", doctorId);
            return doctorManageMapper.selectList(queryWrapper);
        }
}
